package com.hzcx.app.simplechat.ui.publicui.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hzcx.app.simplechat.R;

import java.util.List;

public class PublicDialogAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public PublicDialogAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        helper.setText(R.id.tv_menu,item);
        if(helper.getAdapterPosition()>=getData().size()-1){
            helper.setVisible(R.id.view_line,false);
        }else {
            helper.setVisible(R.id.view_line,true);
        }
    }
}
